<!--{eval $_TPL['titles'] = array('通知');}-->
<!--{template header}-->

<h2 class="title"><img src="image/icon/pm.gif">通知</h2>

<div class="tabs_header">
	<ul class="tabs">
		<li><a href="space.html?do=pm"><span>短消息</span></a></li>
		<li$actives[notice]><a href="space.html?do=notice"><span>通知</span></a></li>
		<!--{if $_SCONFIG['my_status']}-->
		<li$actives[userapp]><a href="space.html?do=notice&view=userapp"><span>应用消息</span></a></li>
		<!--{/if}-->
	</ul>
</div>

<!--{if $view=='userapp'}-->

	
	<script type="text/javascript">
		function manyou_add_userapp(hash, url) {
			if(isUndefined(url)) {
				$(hash).innerHTML = "<tr><td colspan=\"2\">成功忽略了该条应用消息</td></tr>";
			} else {
				$(hash).innerHTML = "<tr><td colspan=\"2\">正在引导您进入...</td></tr>";
			}
			var x = new Ajax();
			x.get('do.html?ac=ajax&op=deluserapp&hash='+hash, function(s){
				if(!isUndefined(url)) {
					location.href = url;
				}
			});
		}
	</script>
	
	<div id="content">

		<style>
			.topicList table{width:100%;margin:10px 0 5px 0;}
			.topicList td{color:#333;}
		</style>
		<!--{if $list}-->
		<div class="m_box">
		<!--{loop $list $key $invite}-->
			<h3 class="feed_header">
				<a href="space.html?do=notice&view=userapp&op=del&appid=$invite[0][appid]" class="r_option">忽略该应用的所有邀请</a>
				<a href="userapp.html?id=$invite[0][appid]&uid=$space[uid]" title="$apparr[$invite[0][appid]]"><img src="http://appicon.manyou.com/icons/$invite[0][appid]" alt="$apparr[$invite[0][appid]]" align="absmiddle" /></a> 
				您有 <!--{eval echo count($invite);}--> 个 $invite[0][typename] <!--{if $invite[0][type]}-->请求<!--{else}-->邀请<!--{/if}-->
			</h3>
			<table cellpadding="0" cellspacing="0" width="100%" class="topic_list">
			<!--{loop $invite $value}-->
				<tbody>
				<tr>
					<td width="70" valign="top">
						<div class="avatar48">
							<a href="space.html?uid=$value[fromuid]" class="avatarlink"><img src="<!--{avatar($value[fromuid],small)}-->" alt="{$_SN[$value[fromuid]]}" /></a>
						</div>
					</td>
					<td id="$value[hash]">
						$value[myml]
					</td>
				</tr>
				</tbody>
			<!--{/loop}-->
			</table>
		<!--{/loop}-->
		</div>
		<div class="page">$multi</div>
		<!--{else}-->
		<div class="c_form">
			没有新的应用请求或邀请
		</div>
		<!--{/if}-->
	</div>
	
	<div id="sidebar">
		<div class="sidebox">
		<h2 class="title">应用分类</h2>
		<ul class="line_list">
			<li><a href="space.html?do=notice&view=userapp">查看全部应用消息</a></li>
			<!--{loop $apparr $type $val}-->
			<li><a href="userapp.html?id=$val[0][appid]&uid=$space[uid]" title="$val[0][typename]"><img src="http://appicon.manyou.com/icons/$val[0][appid]" alt="$val[0][typename]" /></a><a href="space.html?do=notice&view=userapp&type=$val[0][appid]"> <!--{eval echo count($val);}--> 个 $val[0][typename] <!--{if $val[0][type]}-->请求<!--{else}-->邀请<!--{/if}--></a></li>
			<!--{/loop}-->
		</ul>
		</div>
	</div>

<!--{else}-->
	
	<div id="content">
		
		<!--{if $list}-->
		<div class="notice">
		提示：当你感觉有些通知对你造成骚扰，请点击通知右侧的屏蔽小图标，屏蔽此类通知。
		</div>
		
		<ul class="line_list">
		<!--{loop $list $value}-->
		<li>
			<a href="cp.html?ac=common&op=ignore&authorid=$value[authorid]&type=$value[type]" id="a_note_$value[id]" onclick="ajaxmenu(event, this.id, 99999)" class="float_cancel" title="屏蔽">屏蔽</a>
			<a href="space.html?uid=$value[authorid]">{$_SN[$value[authorid]]}</a> <!--{if $value[new]}--><span style="font-weight:bold;">$value[note]</span><!--{else}-->$value[note]<!--{/if}-->
			&nbsp;<span class="time"><!--{date('m-d H:i',$value[dateline],1)}--></span>
		</li>
		<!--{/loop}-->
		</ul>
		<div class="page">$multi</div>
		<!--{else}-->
		<div class="c_form">
		没有新的通知。
		</div>
		<!--{/if}-->
	</div>
	
	<div id="sidebar">
		
		<!--{if $users}-->
		<div class="sidebox">
			<h2 class="title">有新朋友关注了您</h2>
			<ul class="avatar_list">
				<!--{loop $users $key $value}-->
				<li>
					<div class="avatar48"><a href="space.html?uid=$value[authorid]"><img src="<!--{avatar($value[authorid],small)}-->" alt="{$_SN[$value[authorid]]}" /></a></div>
					<p><a href="space.html?uid=$value[authorid]" title="{$_SN[$value[authorid]]}">{$_SN[$value[authorid]]}</a></p>
					<p class="time"><a href="cp.html?ac=friend&op=add&uid=$value[authorid]" id="add_note_friend_$key" onclick="ajaxmenu(event, this.id, 99999, '', -1)">加为好友</a></p>
				</li>
				<!--{/loop}-->
			</ul>
		</div>
		<!--{/if}-->
		
		<div class="sidebox">
			<h2 class="title">通知分类</h2>
			<ul class="line_list">
				<li><a href="space.html?do=notice">查看全部通知</a></li>
				<!--{loop $noticetypes $type $name}-->
				<li><a href="space.html?do=notice&type=$type">$name</a></li>
				<!--{/loop}-->
			</ul>
		</div>
	</div>
	
<!--{/if}-->
<!--{template footer}-->
